package cn.mypayment.mail.bean;

import java.io.Serializable;
import javax.activation.DataHandler;
/**
 *
 * Email Attachment info
 * <p>Copyright: Copyright (c) 2005</p>
 * <p>Company: Swanet </p>
 * @author Tim huang
 * @version 1.0
 */
public class EmailAttachment implements Serializable{
  private String fileName;
  private int size;
  private DataHandler dataHandler;
  /**
   *
   */
  public EmailAttachment(){
  }
  /**
   *
   * @param fileName String
   * @param dataHandler DataHandler
   */
  public EmailAttachment(String fileName, DataHandler dataHandler){
      this.fileName = fileName;
      this.dataHandler = dataHandler;
  }

  /**
   *
   * @param fileName String
   * @param dataHandler DataHandler
   * @param size int
   */
  public EmailAttachment(String fileName, DataHandler dataHandler,int size){
      this.fileName = fileName;
      this.dataHandler = dataHandler;
      this.size = size;
  }

  /**
   *
   * @return String
   */
  public String getFileName(){
      return fileName;
  }

  public void setFileName(String fileName){
      this.fileName = fileName;
  }

  public DataHandler getDataHandler(){
      return dataHandler;
  }

  public void setDataHandler(DataHandler dataHandler){
      this.dataHandler = dataHandler;
  }

  public String toString(){
      return "Attachment[" + fileName + "]";
  }
  public int getSize() {
    return size;
  }
  public void setSize(int size) {
    this.size = size;
  }

}
